const App = {
    mixins: [Query],//配置文件，路径/utils/mixins.js
    data() {
        return {
            page: {
                value1:'',
                PageNumber: 1, //页码
                RowAmount: 10,
                Condition: window.btoa(unescape(encodeURIComponent("%%"))),
                
            },
            Natural_Resource_Tag_SerialNumber:''
        }
    },
    mounted() {

    },
    methods: {
        Treedata() {
            $.ajax({
                headers: requestHeaders(),
                url: `${mh}/generalBusiness/generalQueryByTableName`,
                type: "POST",
                data: {
                    Data: 'natural_resources_tags',
                    Condition: "Row_Status='0'",
                },
                success: (data) => {
                    this.treeData = data; // 直接使用 this
                },
                complete: (XMLHttpRequest) => {
                    requestPretreatment(XMLHttpRequest);
                },
                dataType: "json",
            });
        },
        //树的点击筛选事件
        check(){
            this.page.Condition = window.btoa(unescape(encodeURIComponent("%"+ this.Natural_Resource_Tag_SerialNumber + "%")));
            this.postgetList(this.page)
        },
        personalAdd() {
            window.location.href = "./add.html?action=Add&nodeKey=" + this.Natural_Resource_Tag_SerialNumber;
        },
        handleEdit(row) {
            window.location.href = "./show.html?action=Modify&nodeKey=" + row.Natural_Resource_SerialNumber;
        },
        //树的点击筛选事件
        handleNodeClick(data, node) {
            this.Natural_Resource_Tag_SerialNumber = data.Natural_Resource_Tag_SerialNumber
            this.page.ExtensionCondition =  window.btoa(unescape(encodeURIComponent("AND natural_resources_tags.Natural_Resource_Tag_SerialNumber ='"+ data.Natural_Resource_Tag_SerialNumber +"'")));
            this.postgetList(this.page);
        },
    },
};

const { createApp } = Vue;
const app = createApp(App);
//这种方式是引入全部图标，无需单个引入
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component);
}
const ElMessage = ElementPlus.ElMessage;
app.use(ElementPlus,{locale: zhCn});
app.mount("#app");
